Skip to main content
Version: Upcoming

UserRateOverride

V8 Message Definiton

Records in this table override SpiderRock global discount rate values in option pricing calculations. Note: Expiry dates that fall between years values below will be interpolated using a cubic spline on (days * rate)

METADATA

AttributeValue
Topic3585-option-pricing
MLink TokenClientControl
ProductSRControl
accessTypeSELECT,UPDATE,INSERT,DELETE

Table Definition

FieldTypeKeyDefault ValueComment
clientFirmVARCHAR(16)PRI''
timestampDATETIME(6)'1900-01-01 00:00:00.000000'
textTINYTEXT''user detail if any
CurveListJSON'JSON_ARRAY()'

PRIMARY KEY DEFINITION (Unique)

FieldSequence
clientFirm1

JSON Block (CurveList)

FieldTypeComment
daysenum - dayscalendar days to expiration actual365 days per year
rateenum - rate
lnRateenum - lnRate
shRateenum - shRate

CREATE TABLE EXAMPLE QUERY

CREATE TABLE `SRControl`.`MsgUserRateOverride` (
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
`text` TINYTEXT NOT NULL DEFAULT '' COMMENT 'user detail (if any)',
`CurveList` JSON NOT NULL DEFAULT JSON_ARRAY() CHECK(JSON_VALID(CurveList)),
PRIMARY KEY USING HASH (`clientFirm`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='Records in this table override SpiderRock global discount rate values in option pricing calculations.\nNote: Expiry dates that fall between years values below will be interpolated using a cubic spline on (days * rate)';

SELECT TABLE EXAMPLE QUERY

SELECT
`clientFirm`,
`timestamp`,
`text`,
`CurveList`
FROM `SRControl`.`MsgUserRateOverride`
WHERE
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';

UPDATE TABLE EXAMPLE QUERY

UPDATE `SRControl`.`MsgUserRateOverride` 
SET
/* Replace with a DATETIME(6) */
`timestamp` = '2022-01-01 12:34:56.000000',
/* Replace with a TINYTEXT */
`text` = 'dummy tiny text',
/* Replace with a JSON */
`CurveList` = '{"key": "value"}'
WHERE
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';

INSERT TABLE EXAMPLE QUERY

INSERT INTO `SRControl`.`MsgUserRateOverride`(
/* Replace with a VARCHAR(16) */
`clientFirm`,
/* Replace with a DATETIME(6) */
`timestamp`,
/* Replace with a TINYTEXT */
`text`,
/* Replace with a JSON */
`CurveList`
)
VALUES(
'Example_clientFirm',
'2022-01-01 12:34:56.000000',
'dummy tiny text',
'{"key": "value"}'
);

DELETE TABLE EXAMPLE QUERY

DELETE FROM `SRControl`.`MsgUserRateOverride` 
WHERE
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';

Doc Columns Query

SELECT * FROM SRControl.doccolumns WHERE TABLE_NAME='UserRateOverride' ORDER BY ordinal_position ASC;